class Solution:
    def hammingWeight(self, n: int) -> int:
        res = 0 
        while n:
            res += 1
            n = n & (n-1)
        return res


if __name__ == '__main__':
    s = Solution()
    print(s.hammingWeight(0b00000000000000000000000000001011))
    